package com.aiit.ssm.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.aiit.ssm.dao.UserDao;
import com.aiit.ssm.model.User;

/**
 * 
 * @author Administrator
 * Service�� --->DAO��
 *
 */

@Service
public class UserServiceImp  {

	
	@Autowired
	 UserDao  userDao;

/*	public List<User> getAllUsers() {

		return  this.userDao.findAll();
	}

	
	public int deleteById(int userId) {

		return this.userDao.deleteOneById(userId);
	}*/

	
	public int userLogin(User user) {
		// TODO Auto-generated method stub
		System.out.println("userLogin");
		return userDao.login(user);
	}


	public int userRegist(User user) {
		// TODO Auto-generated method stub
		return userDao.insertUser(user);
	}
	
	public int selectUserName(String userName) {
		
		return userDao.selectName(userName);
	}

}
